/**
 * 
 */
package uk.ac.manchester.cs.graph;

/**
 * @author Pavel Klinov
 *
 * pklinov@cs.man.ac.uk, pklinov@clarkparsia.com
 * 
 * Jan 10, 2009
 * 
 * Simple key-value pair
 */
public class KeyValue<K extends Comparable<K>, V> implements Comparable<KeyValue<K, ? extends Object>> {

	private K m_key;
	private V m_value;
	
	public KeyValue(K key, V value) {
		
		m_key = key;
		m_value = value;
	}
	
	public K getKey() {
		
		return m_key;
	}
	
	public V getValue() {
		
		return m_value;
	}
	
	public int compareTo(KeyValue<K, ? extends Object> arg) {

		return m_key.compareTo( arg.getKey() );
	}
}
